package com.beauty.inventory.dto;

import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDate;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class InventoryRequest {
    
    @NotBlank(message = "产品ID不能为空")
    private String productId;
    
    @NotNull(message = "数量不能为空")
    @Min(value = 0, message = "数量不能小于0")
    private Integer quantity;
    
    @NotNull(message = "预留数量不能为空")
    @Min(value = 0, message = "预留数量不能小于0")
    private Integer reservedQuantity;
    
    private Integer safetyStock;
    
    private String warehouseId;
    
    private String location;
    
    private String batchNumber;
    
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate expiryDate;
} 